import os
lsdata = os.listdir("./music")
print("artistLists:")
for data in lsdata:
	print(data)
tmp = input("artistName:")
searched = False
s_data = "0example"
for data in lsdata:
    if data==tmp:
        searched = True
        s_data = tmp
if not searched:
    print("Error:noArtistErr")
else:
    os.chdir("./music/"+s_data+"/music")
    musicName = input("musicName:")
    os.remove("./"+musicName+"/music.mp3")
    os.rmdir("./"+musicName)
    os.chdir("../..")
    os.system("python ./upd.py")